<!-- tin moi nhat -->
<div id="detail-title">
    <span class="title"><?php echo $cate_name; ?></span>
    <img src="<?php echo $img_url; ?>style/images/img28.gif">
    <div class="ico-social">
        <a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $current_url; ?>&display=popup&ref=plugin" target="_blank"><img src="<?php echo $img_url; ?>style/images/imgfb.gif" width="16" height="16" border="0"></a>
        <a href="https://twitter.com/share" target="_blank"><img src="<?php echo $img_url; ?>style/images/imgtw.gif" width="16" height="16" border="0"></a>
        <a href="https://plus.google.com/share?url=<?php echo $current_url; ?>" target="_blank"><img src="<?php echo $img_url; ?>style/images/imggp.gif" width="16" height="16" border="0"></a>
        <a href="javascript:void(0);" onclick="return openPopup('contactForm')"><img src="<?php echo $img_url; ?>style/images/imgma.gif" width="16" height="16" border="0"></a>
        <a href="javascript:void(0);" onclick="javascript:window.print();"><img src="<?php echo $img_url; ?>style/images/imgpr.gif" width="16" height="16" border="0"></a>
        <span class="time">
            <?php
            //show date time Tieng Viet
            $str_search = array(
                "Mon",
                "Tue",
                "Wed",
                "Thu",
                "Fri",
                "Sat",
                "Sun"
            );
            $str_replace = array(
                "Th&#7913; hai",
                "Th&#7913; ba",
                "Th&#7913; t&#432;",
                "Th&#7913; n&#259;m",
                "Th&#7913; s&#225;u",
                "Th&#7913; b&#7843;y",
                "Ch&#7911; nh&#7853;t"
            );
            //$timenow = gmdate("D, d/m/Y | H:i", time() + 7 * 3600);
            $time = strtotime($aNewsDetails['display_date']);
            $timenow = date('D, d/m/Y | H:i', $time);
            $timenow = str_replace($str_search, $str_replace, $timenow);
            echo $timenow;
            ?>        
        </span>        
    </div>
</div>  
<div id="seperator"></div>
<!-- details: column -->
<div id="detail-body">
    <div id="detail-bleft">
        <div id="detail-news">
            <?php if (isset($aNewsDetails) && count($aNewsDetails) > 0) { ?>
                <span class="title"><?php echo $aNewsDetails['title']; ?></span>
                <span class="news-content">

                    <?php
                    if ($aNewsDetails['source'] != 'Báo Hải Quan' && $aNewsDetails['source'] != 'Báo Công Thương') {
                        echo $aNewsDetails['short_desc'];
                    ?><br />
                    <?php                     
                    } 
                    $full_desc = preg_replace('#<p.*?>(.*?)</p>#i', '<p>\1</p>', $aNewsDetails['full_desc']);
                    $full_desc = preg_replace('#<span.*?>(.*?)</span>#i', '<span>\1</span>', $full_desc);
                    $full_desc = preg_replace('#<ol.*?>(.*?)</ol>#i', '<ol>\1</ol>', $full_desc);
                    $full_desc = preg_replace('#<ul.*?>(.*?)</ul>#i', '<ul>\1</ul>', $full_desc);
                    $full_desc = preg_replace('#<li.*?>(.*?)</li>#i', '<li>\1</li>', $full_desc);
                    echo $full_desc;
                    ?>
                </span>
                <?php
            }
            else
                echo "<br><br><div align='center' class='nodata'>" . $page_nodata . "</div>";
            ?>
        </div>
        <span class="news-source" ><?php if ($aNewsDetails['source'] != NULL && $aNewsDetails['source'] != '') {
                echo 'Nguồn: ' . $aNewsDetails['source'];
            } ?></span>
        <div class="fb-like" data-href="<?php echo $current_url; ?>" data-width="440px" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
        <div class="fb-comments" data-href="<?php echo $current_url; ?> "data-numposts="10" data-width="440px" data-colorscheme="light"></div>        
        <div id="noibat">
            <div class="cate-title">
                <img src="<?php echo $img_url; ?>style/images/img7.gif" width="14" height="15" border="0" alt=""/> 
                <span>Tin nổi bật</span>
                <a href="javascript:void(0);" class="more">Xem thêm&nbsp;<img src="<?php echo $img_url; ?>style/images/img3.png" alt="" border="0" style="float:none;"/></a>
            </div>  
            <ul class="news-list">
                <?php
                $parent_cate_url = "";
                foreach ($aFeatureNews as $item):
                    //Nếu tin có parent_cate_url thì mới attach vào.
                    if ($item->parent_cate_url != "")
                        $parent_cate_url = $item->parent_cate_url . "/";
                    ?>           
                    <li><a href="<?php echo $base_url . $parent_cate_url . $item->news_cate_url . "/" . $item->url . "-" . $item->news_id; ?>.html" title="<?php echo $item->title; ?>" class="lk4"><?php echo $item->title; ?></a> </li>
                    <?php
                    $parent_cate_url = "";
                endforeach;
                ?>              
            </ul>                
        </div>
        <div id="others">
            <div class="cate-title">
                <img src="<?php echo $img_url; ?>style/images/img7.gif" width="14" height="15"  alt=""/> 
                <span>Tin khác</span>
                <a href="javascript:void(0);" class="more">Xem thêm&nbsp;<img src="<?php echo $img_url; ?>style/images/img3.png" alt="" border="0" style="float:none;"/></a>
            </div>  
            <ul class="news-list">
                <?php
                foreach ($aOtherNews as $item):
                    //Nếu tin có parent_cate_url thì mới attach vào.
                    if ($item->parent_cate_url != "")
                        $parent_cate_url = $item->parent_cate_url . "/";
                    ?>           
                    <li><a href="<?php echo $base_url . $parent_cate_url . $item->news_cate_url . "/" . $item->url . "-" . $item->news_id; ?>.html" title="<?php echo $item->title; ?>" class="lk4"><?php echo $item->title; ?></a> </li>
                    <?php
                    $parent_cate_url = "";
                endforeach;
                ?>                    
            </ul>                
        </div>        
    </div>
    <div id="detail-bright">
        <!-- box tin doc nhieu -->
<?php require APPPATH . "views/common/box_news_tin-doc-nhieu.php" ?> 
    </div>
<!--    <img src="<?php echo $img_url; ?>style/images/test10.jpg" width="160" height="600" style="margin-top:20px;">-->
    <embed width="220" height="450" allowscriptaccess="always" wmode="transparent" loop="true" play="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"  src="http://adi.vcmedia.vn/adt/cpc/adsapp/2014/09/peuge-11410584331.swf">
    <div class="clearfix"></div>    
</div>  
<br>

<!-- style for demo and examples -->
<style>
    .content{margin:0; width:96%; height:520px; padding:4px; overflow:auto; background:#FFF;}
    .content p:nth-child(even){color:#999; font-family:Georgia,serif; font-size:17px;}
    .content p:nth-child(3n+0){color:#c96;}
</style>
<!-- Custom scrollbars CSS -->
<link href="<?php echo $img_url; ?>style/css/jquery.mCustomScrollbar.css" rel="stylesheet" />
<!-- scroll box -->
<script src="<?php echo $img_url; ?>style/js/FE/jquery.mCustomScrollbar.concat.min.js"></script>
<script>
            (function($) {
                $(window).load(function() {
                    $("#noibat-content").mCustomScrollbar({
                        scrollButtons: {
                            enable: true
                        },
                        callbacks: {
                            onScrollStart: function() {
                                OnScrollStart();
                            },
                            onScroll: function() {
                                OnScroll();
                            },
                            onTotalScroll: function() {
                                OnTotalScroll();
                            },
                            onTotalScrollBack: function() {
                                OnTotalScrollBack();
                            },
                            onTotalScrollOffset: 140,
                            onTotalScrollBackOffset: 120,
                            whileScrolling: function() {
                                WhileScrolling();
                            }
                        }
                    });
                    function OnScrollStart() {
                        $(".output .onScrollStart").stop(true, true).css("display", "inline-block").delay(500).fadeOut(500);
                    }
                    function OnScroll() {
                        $(".output .onScroll").stop(true, true).css("display", "inline-block").delay(500).fadeOut(500);
                    }
                    function OnTotalScroll() {
                        $(".output .onTotalScroll").stop(true, true).css("display", "inline-block").delay(500).fadeOut(500);
                    }
                    function OnTotalScrollBack() {
                        $(".output .onTotalScrollBack").stop(true, true).css("display", "inline-block").delay(500).fadeOut(500);
                    }
                    function WhileScrolling() {
                        $(".output .whileScrolling").stop(true, true).css("display", "inline-block").fadeOut(500);
                        $(".info .content-position").text(mcs.top);
                        $(".info .dragger-position").text(mcs.draggerTop);
                        $(".info .scroll-pct").text(mcs.topPct + "%");
                    }
                    $(".total-scroll-offset").text($("#content_1").data("onTotalScroll_Offset"));
                    $(".total-scroll-back-offset").text($("#content_1").data("onTotalScrollBack_Offset"));
                    $(".output a").click(function(e) {
                        e.preventDefault();
                        var $this = $(this),
                                rel = $this.attr("rel"),
                                target = $this.parent().find("." + rel);
                        target.add($this).toggleClass("hidden");
                    });
                });
            })(jQuery);
</script>    